<template>
  <el-form ref="form" label-position="right" class="j-attribute-set" size="mini" label-width="80px">
    <el-form-item label="表单模式">
      <el-radio-group v-model="value.attribute.inline">
        <el-radio :label="true">分行</el-radio>
        <el-radio :label="false">单行</el-radio>
      </el-radio-group>
    </el-form-item>
    <el-form-item label="标签位置">
      <el-select v-model="value.attribute['label-position']" placeholder="请设置下拉框尺寸">
        <el-option label="左" value="left"></el-option>
        <el-option label="上" value="top"></el-option>
        <el-option label="右" value="right"></el-option>
      </el-select>
    </el-form-item>
    <el-form-item v-if="value.attribute['label-position'] != 'top'" label="标签宽度">
      <el-input v-model="value.attribute['label-width']" placeholder="请输入"></el-input>
    </el-form-item>
    <el-form-item label="组件尺寸">
      <el-select v-model="value.attribute.size" placeholder="请设置">
        <el-option label="大" value="medium"></el-option>
        <el-option label="中" value="small"></el-option>
        <el-option label="小" value="mini"></el-option>
      </el-select>
    </el-form-item>
    <el-form-item label="必填标注">
      <el-radio-group v-model="value.attribute['hide-required-asterisk']">
        <el-radio :label="false">显示</el-radio>
        <el-radio :label="true">不显示</el-radio>
      </el-radio-group>
    </el-form-item>
    <el-form-item label="错误信息">
      <el-radio-group v-model="value.attribute['show-message']">
        <el-radio :label="true">显示</el-radio>
        <el-radio :label="false">不显示</el-radio>
      </el-radio-group>
    </el-form-item>
    <el-form-item label="行内校验">
      <el-radio-group v-model="value.attribute['inline-message']">
        <el-radio :label="true">是</el-radio>
        <el-radio :label="false">否</el-radio>
      </el-radio-group>
    </el-form-item>
    <el-form-item label="反馈图标">
      <el-radio-group v-model="value.attribute['status-icon']">
        <el-radio :label="true">显示</el-radio>
        <el-radio :label="false">不显示</el-radio>
      </el-radio-group>
    </el-form-item>
    <el-form-item label="触发验证">
      <el-radio-group v-model="value.attribute['validate-on-rule-change']">
        <el-radio :label="true">敏感</el-radio>
        <el-radio :label="false">非敏感</el-radio>
      </el-radio-group>
    </el-form-item>
    <el-form-item label="禁用表单">
      <el-radio-group v-model="value.attribute.disabled">
        <el-radio :label="true">是</el-radio>
        <el-radio :label="false">否</el-radio>
      </el-radio-group>
    </el-form-item>
  </el-form>
</template>
<script type="text/javascript">

export default {
  props: {
    value: [Array, Object, Number, String]
  },
  /**
   * 页面加载执行
   * @return {[type]} [description]
   */
  mounted() {

  }
}

</script>
<style type="text/css" lang="scss">
.j-attribute-set {
  padding: 10px;
}

.el-form-item--mini.el-form-item,
.el-form-item--small.el-form-item {
  margin-bottom: 10px;
}

.el-form--label-top .el-form-item__label {
  float: none;
  display: inline-block;
  text-align: left;
  padding: 0;
}

</style>
